package mylibrary.designPattern.proxy.jdk_dynamic;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class TestHandle implements InvocationHandler{

	private Test test;
	
	public TestHandle(Test test) {
		this.test = test;
	}

	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		
		//System.out.println("1111 " + proxy);
		
		System.out.println("before do");
		
		Object c = method.invoke(test, args);
		
		System.out.println("after do");
		return c;
	}
	
}
